.class public Lcom/instagram/android/login/PasswordResetActivity;
.super Lcom/instagram/android/activity/h;
.source "PasswordResetActivity.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 17
    invoke-direct {p0}, Lcom/instagram/android/activity/h;-><init>()V

    return-void
.end method

.method private b(Ljava/lang/String;)Z
    .locals 3
    .parameter

    .prologue
    const/4 v0, 0x0

    .line 68
    const-string v1, "instagram://"

    invoke-virtual {p1, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_1

    const-string v1, "instagr.am://"

    invoke-virtual {p1, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_1

    .line 82
    :cond_0
    :goto_0
    return v0

    .line 72
    :cond_1
    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    .line 73
    invoke-virtual {v1}, Landroid/net/Uri;->getHost()Ljava/lang/String;

    move-result-object v1

    .line 74
    if-eqz v1, :cond_0

    .line 75
    const-string v2, "android"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_2

    const-string v2, "instagr.am"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_2

    const-string v2, "reset_password"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 78
    :cond_2
    const/4 v0, 0x1

    goto :goto_0
.end method


# virtual methods
.method protected j()V
    .locals 6

    .prologue
    const/16 v5, 0x24

    .line 26
    invoke-static {}, Lcom/instagram/service/a;->a()Lcom/instagram/service/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/service/a;->d()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 27
    sget v0, Lcom/facebook/ba;->must_log_out:I

    invoke-static {v0}, Lcom/instagram/n/j;->a(I)V

    .line 28
    invoke-virtual {p0}, Lcom/instagram/android/login/PasswordResetActivity;->finish()V

    .line 31
    :cond_0
    invoke-virtual {p0}, Lcom/instagram/android/login/PasswordResetActivity;->f()Landroid/support/v4/app/r;

    move-result-object v0

    sget v1, Lcom/facebook/aw;->layout_container_main:I

    invoke-virtual {v0, v1}, Landroid/support/v4/app/r;->a(I)Landroid/support/v4/app/Fragment;

    move-result-object v0

    .line 32
    if-nez v0, :cond_1

    .line 33
    new-instance v0, Lcom/instagram/android/login/b/y;

    invoke-direct {v0}, Lcom/instagram/android/login/b/y;-><init>()V

    .line 35
    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    .line 36
    invoke-virtual {p0}, Lcom/instagram/android/login/PasswordResetActivity;->getIntent()Landroid/content/Intent;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Intent;->getDataString()Ljava/lang/String;

    move-result-object v2

    .line 37
    invoke-direct {p0, v2}, Lcom/instagram/android/login/PasswordResetActivity;->b(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 38
    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    .line 40
    const-string v3, "argument_user_id"

    const-string v4, "u"

    invoke-virtual {v2, v4}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-static {v4, v5}, Ljava/lang/Long;->parseLong(Ljava/lang/String;I)J

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Long;->toString(J)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 41
    const-string v3, "argument_reset_token"

    const-string v4, "t"

    invoke-virtual {v2, v4}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 58
    :goto_0
    invoke-virtual {v0, v1}, Landroid/support/v4/app/Fragment;->g(Landroid/os/Bundle;)V

    .line 60
    invoke-virtual {p0}, Lcom/instagram/android/login/PasswordResetActivity;->f()Landroid/support/v4/app/r;

    move-result-object v1

    invoke-virtual {v1}, Landroid/support/v4/app/r;->a()Landroid/support/v4/app/af;

    move-result-object v1

    .line 61
    sget v2, Lcom/facebook/aw;->layout_container_main:I

    invoke-virtual {v1, v2, v0}, Landroid/support/v4/app/af;->b(ILandroid/support/v4/app/Fragment;)Landroid/support/v4/app/af;

    .line 62
    invoke-virtual {v1}, Landroid/support/v4/app/af;->a()I

    .line 65
    :cond_1
    :goto_1
    return-void

    .line 42
    :cond_2
    invoke-static {v2}, Lcom/instagram/android/f/a;->a(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_3

    .line 46
    const-string v3, "\\/\\?.*"

    const-string v4, ""

    invoke-virtual {v2, v3, v4}, Ljava/lang/String;->replaceFirst(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 47
    const-string v3, "/"

    invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    .line 49
    const-string v3, "argument_user_id"

    array-length v4, v2

    add-int/lit8 v4, v4, -0x2

    aget-object v4, v2, v4

    invoke-static {v4, v5}, Ljava/lang/Long;->parseLong(Ljava/lang/String;I)J

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Long;->toString(J)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 50
    const-string v3, "argument_reset_token"

    array-length v4, v2

    add-int/lit8 v4, v4, -0x1

    aget-object v2, v2, v4

    invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 53
    :cond_3
    sget v0, Lcom/facebook/ba;->uri_error:I

    invoke-static {v0}, Lcom/instagram/n/j;->a(I)V

    .line 54
    invoke-virtual {p0}, Lcom/instagram/android/login/PasswordResetActivity;->finish()V

    goto :goto_1
.end method
